﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using BCCommon.OAEnums;
using BCEntity.OA.TeamWorks.TaskRecord;

namespace BCData.OA.TeamWorks.TaskReceiverRecord
{
    public interface ITaskReceiverRecordData
    {
        /// <summary>
        /// 根据活动实例Id获取抄送人信息列表
        /// </summary>
        /// <param name="workflowActivityInstanceId">活动实例Id</param>
        /// <returns></returns>
        Task<IEnumerable<TaskReceiverRecordEntity>> GetByWorkflowActivityInstanceId(long workflowActivityInstanceId);

        /// <summary>
        /// 创建任务参与者记录
        /// </summary>
        /// <param name="taskReceiverRecordEntities">任务参与者信息</param>
        /// <returns></returns>
        Task<bool> Insert(List<TaskReceiverRecordEntity> taskReceiverRecordEntities);

        /// <summary>
        /// 根据接收人管理员Id及接收人角色(执行人、参与人、审批人、复核人)获取任务参与者记录
        /// </summary>
        /// <param name="receiverAdminId">接收人管理员Id</param>
        /// <param name="oATaskReceiverRole">接收人角色(执行人、参与人、审批人、复核人)</param>
        /// <returns></returns>
        Task<IEnumerable<TaskReceiverRecordEntity>> GetByReceiverAdminIdAndReceiverRoleAsync(long receiverAdminId, OATaskReceiverRole oATaskReceiverRole);

        /// <summary>
        /// 根据活动实例Id和接收人角色获取任务参与者记录
        /// </summary>
        /// <param name="workflowActivityInstanceIds">活动实例Id</param>
        /// <param name="oATaskReceiverRole">接收人角色</param>
        /// <returns></returns>
        Task<IEnumerable<TaskReceiverRecordEntity>> GetByWorkflowActivityInstanceIdsAndReceiverRoleAsync(List<long> workflowActivityInstanceIds, OATaskReceiverRole oATaskReceiverRole);

        Task<IEnumerable<TaskReceiverRecordEntity>> GetTaskReceiverRecordsAsync(string taskRecordNo);
    }
}
